<?php
		include '../controladores/ControladorUsuarios.php';
		
		$command = new ControladorUsuarios();
				
		if ($command->searchEmailAndPassword($_POST['username'],$_POST['password']))
			header("Location:user_index.php?user_id=".$command->obtainUserId($_POST['username']));
		else 
			header("Location:login.html");
?>